Type conversion
There is usually no trouble in assigning a value to a variable of different type. The value will be preserved as expected except where;
nThe variable is too small to hold the value. In this case it will be corrupted (this is bad).
nThe variable is an integer type and is being assigned a real value. The value is rounded down. This is often done deliberately by the programmer.
You can mix the types of values in your arithmetic expressions. char types will be treated as int. Otherwise where types of different size are involved, the result will usually be of the larger size, so a float and a double would produce a double result. Where integer and real types meet, the result will be a double.